<div id="content">
	<a href="teacher.php" alt="zurück" title="Zurück"><img src="../templates/img/back.png" alt="Zurück" title="Zurück" /></a><br />
<?php
	$sResTable = "<table>";
	$sResTable .= "<tr><th>Frage</th><th colspan=2>Durchschnitt</th><th colspan=6>Einzel</th></tr>";
	foreach($aQuestions as $id=>$question){
		$sResTable .= "<tr>
				<td>".$question."</td>
				<td ".($aResultsOveral[$id]['ego']>3?"style='border-color:#e06767'":"style='border-color:#aaff56'").">".$aResultsOveral[$id]['ego']."</td>
				<td ".($aResultsOveral[$id]['wish']>3?"style='border-color:#e06767'":"style='border-color:#aaff56'").">".$aResultsOveral[$id]['wish']."</td><td></td>";
			for($i=0; $i<count($aDistinctResults);$i++){
				$sResTable .= "<td>".$aDistinctResults[$i][$id]['ego']."</td>";
				$sResTable .= "<td>".$aDistinctResults[$i][$id]['wish']."</td> <td></td>";
			}					
			$sResTable .= "</tr>";
	}
	$sResTable .= "</table>";
	echo $sResTable;
?>
</div>
